﻿#ifndef LINK_H
#define LINK_H

#include <QGraphicsLineItem>
#include <QPen>
#include <QColor>

class Entity;

class Link : public QGraphicsLineItem
{
public:
    Link(Entity *fromEntity, Entity *toEntity);
    ~Link();

    Entity *fromEntity() const;
    Entity *toEntity() const;

    void setColor(const QColor &color);
    QColor color() const;

    void trackNodes();

private:
    Entity *m_pFromEntity;
    Entity *m_pToEntity;
};

#endif
